<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAutoreplyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('autoreplys', function (Blueprint $table) {

            $table->increments('id');
            $table->string('rulename', 30);
            $table->string('keyword', 90);
            $table->string('media_id', 180)->nullable();
            $table->string('type', 30); // image,news, text
            $table->text('content')->nullable(); // 仅限type为text时用
            $table->integer('create_time');
            //$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('autoreplys');
    }
}
